#ifndef MYPUSHBUTTON_H
#define MYPUSHBUTTON_H

#include <QPushButton>
#include <QDebug>
#include <QPropertyAnimation>
#include <QMouseEvent>
class MyPushButton : public QPushButton
{
    Q_OBJECT
public:
//    explicit MyPushButton(QWidget *parent = nullptr);

    MyPushButton(QString normaling, QString press_img = "");

    void bounceUp();
    void boundDown();

    // 鼠标按下事件
    void mousePressEvent(QMouseEvent *e);
    // 鼠标释放事件
    void mouseReleaseEvent(QMouseEvent *e);

    QString normal_img_path; // 默认图片路径
    QString press_img_path; // 按下后显示图片路径
signals:

private:

};

#endif // MYPUSHBUTTON_H
